<template>
	<view class="container">
		<view class="top">
			<!-- 核销码 -->
			<uni-card margin="15rpx " :title-style="{ fontSize: '28rpx', color: '#888', fontWeight: 'normal', textAlign: 'left', marginLeft: '0' }">
				<view class="code">
					核销码：
					<text class="condeNum">{{condeNum}}</text>
					<view class="qrcode-wrap">
						<image src="/static/autoRepair/qrcode.png" mode="aspectFit" class="qrcode-img" />
					</view>
				</view>
			</uni-card>
			<!-- 维修信息 -->
			<uni-card margin="15rpx" title="维修信息" :title-style="{ fontSize: '28rpx', color: '#888', fontWeight: 'normal', textAlign: 'left', marginLeft: '0' }">
				<view class="repair-info-list">
					<view class="repair-info-row">
						<text class="repair-info-label">维修单号：</text>
						<text class="repair-info-value">3535252</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">维修状态：</text>
						<text class="repair-info-value">进行中</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">车主姓名：</text>
						<text class="repair-info-value">张</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">联系方式：</text>
						<text class="repair-info-value">1993829282</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">维修方式：</text>
						<text class="repair-info-value">上门取车</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">取车位置：</text>
						<text class="repair-info-value">山阳区32号</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">预约日期：</text>
						<text class="repair-info-value">2022/11/10 11:00</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">提交日期：</text>
						<text class="repair-info-value">2022/11/08 12:34</text>
					</view>
				</view>
			</uni-card>
			<!-- 车辆信息 -->
			<uni-card margin="15rpx" title="车辆信息" :title-style="{ fontSize: '28rpx', color: '#888', fontWeight: 'normal', textAlign: 'left', marginLeft: '0' }">
				<view class="repair-info-list">
					<view class="repair-info-row">
						<text class="repair-info-label">车辆类型：</text>
						<text class="repair-info-value">奔驰</text>
					</view>
					<view class="repair-info-row">
						<text class="repair-info-label">车牌号：</text>
						<text class="repair-info-value">豫AXXX</text>
					</view>
				</view>
				<view class="photo-section">
					<view class="">
					  <text class="image-title">整车照片：</text>
					  <uni-section>
					    <view class="example-body">
					      <uni-file-picker limit="9"></uni-file-picker>
					    </view>
					  </uni-section>
					</view>
					<view class="">
					  <text class="image-title">维修部位照片：</text>
					  <uni-section>
					    <view class="example-body">
					      <uni-file-picker limit="9"></uni-file-picker>
					    </view>
					  </uni-section>
					</view>
				</view>
			</uni-card>
			<!-- 底部按钮 -->
			<view class="bottom-btns">
				<button class="reserve-btn" @click="submitReservation">
					取消预约
				</button>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	const condeNum = ref('WE343235V')
</script>

<style scoped>
	.container {
		background: #fff;
		min-height: 100vh;
		padding-bottom: 80rpx;
	}


	.top {
		margin-top: -15rpx;
		padding-top: 20rpx;
		height: 300rpx;
		background-color: #3083fb;
	}

	.code {
		margin-top: 50rpx;
		text-align: center;
		font-size: 28rpx;

	}

	.info-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 15rpx;
	}

	/* .image-title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 15rpx;
	} */

	.image-title {
		font-size: 28rpx;
		padding-top: 20rpx;
	}
	
	.example-body {
		padding: 10px;
		padding-top: 0;
	}
	
	.bottom-btns {
		width: 100%;
		margin-top: 90rpx;
		display: flex;
		justify-content: center;
	}


	.reserve-btn {
		flex: 1;
		margin: 0 32rpx;
		background: #3083fb;
		color: #fff;
		border-radius: 40rpx;
		font-size: 32rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}


	.example-body {
		padding: 10px;
		padding-top: 0;
	}

	.qrcode-wrap {
		display: flex;
		justify-content: center;
		margin: 40rpx;
	}

	.qrcode-img {
		width: 160rpx;
		height: 160rpx;
	}

	.repair-info-list {
		padding: 10rpx 0;
	}

	.repair-info-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 18rpx;
	}

	.repair-info-label {
		color: #888;
		font-size: 28rpx;
		min-width: 180rpx;
		text-align: left;
		margin-top: 25rpx;
	}

	.repair-info-value {
		color: #ccc;
		font-size: 28rpx;
		text-align: right;
		flex: 1;
		margin-left: 16rpx;
	}

	/* 统一uni-section标题样式 */
	::v-deep .uni-section__head-title {
		color: #888 !important;
		font-size: 28rpx !important;
		font-weight: normal !important;
		text-align: left !important;
		margin-left: 0 !important;
	}

	/* 统一uni-card主标题样式 */
	::v-deep .uni-card__title {
		font-size: 28rpx !important;
		color: #888 !important;
		font-weight: normal !important;
		text-align: left !important;
		margin-left: 0 !important;
	}

	.photo-section {
		margin-top: 20rpx;
	}
</style>